<?php

function selectMessage($bdd) {

    $results = $bdd->query('SELECT * FROM `home`');

    return $results;
}

function UpdateMessage($bdd, $new_home_message,$type_img) {

    //$bdd->query("UPDATE home
    //    SET  home_message      = '$new_home_message' WHERE ID = 0"  ); 

    $req = $bdd->prepare('UPDATE home SET home_message = :new_home_message,img_type =:img_type');
    $req->execute(array(
        'new_home_message' => $new_home_message,
        'img_type' => $type_img
    ));
}



?>
